The present invention relates to computer modeling and more particularly, to transforming a source model to a target model.
In the field of computer technology, there is often a need to transform a model such as a computer program or data model written in a first language to a model written in a second language, while preserving the semantics of the original model. For many applications it is desirable to provide simple methods for translating applications written for a first modelling language into a second modelling language. By “simple methods,” it is meant that, as far as possible, the technical person performing the translation should declare the translation properties as a set of rules or invariants to use rather than explicitly building a program that performs the translation.
Such declarative tools to perform model rewriting are widely explored in the area of Model Driven Engineering (MDE). Two known MDE frameworks are EMF (Eclipse Modeling Framework) from the Eclipse foundation, and MOF (MetaObject Facility), which is an OMG (Object Management Group) standard. The four most used model transformation systems are ATL (Atlas Transformation Language), a transformation language from the AtlanMod group, QVT (Query, Views, and Transformations), a standard proposed by OMG, Viatra 2, implemented by the University of Budapest and Epsilon Transformation Language, developed by the University of York.
These transformation languages and toolkits provide specialized constructs, which are useful for common software engineering practices. The languages are typically composed by a set of transformation rules. Rules are divided into two parts, firstly a left hand side (LHS) applies some pattern matching technique to select which rule is going to be executed and secondly, once a rule has been selected (i.e., matched), the right hand side (RHS), which can be considered as production component, is executed.
The pattern matching mechanisms used are, in general, relatively simple. ATL, QVT and Epsilon use similar techniques; the LHS contains the elements that are going to be matched. Consequently, the engines do a cross product of all the elements in the input condition. Viatra 2 is similar, but it provides in addition an incremental pattern matching mechanism. These kinds of pattern matching are adapted for matching a single element at a time, plus an overall pattern.